//
//  WKStockFooterView.m
//  XTXOneToOne
//
//  Created by Canny on 2018/11/20.
//  Copyright © 2018年 WK. All rights reserved.
//

#import "WKStockFooterView.h"

@implementation WKStockFooterView
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor=[UIColor whiteColor];
        [self createUI];
    }
    return self;
}

-(void)createUI{
    UIButton *  bugAll = [[UIButton alloc]init];
    [self addSubview:bugAll];
    [bugAll setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [bugAll setTitle:[NSString stringWithFormat:@"去交易"] forState:UIControlStateNormal];
    bugAll.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
    bugAll.titleLabel.font = [UIFont systemFontOfSize: 15.0];
    [bugAll addTarget:self action:@selector(buyAllClick) forControlEvents:UIControlEventTouchUpInside];
    bugAll.backgroundColor=ThemeColor;
    [bugAll mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.bottom.equalTo(self);
        make.right.equalTo(self.mas_right).offset(-50);
        make.left.equalTo(self.mas_left).offset(50);
    }];
    
}

-(void)buyAllClick{
    if (self.block) {
        self.block();
    }
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
